/*java jdk 1.7+
# -*- coding: utf-8 -
'''
Created on 2020年05月10日
@author: zxyong 13738196011
'''*/

package com.zxy.comport;

import java.io.UnsupportedEncodingException;

import com.zxy.common.Com_Fun;
import com.zxy.common.Com_Para;

public class ComThread extends java.util.TimerTask
{
	public void run()
	{
		try
		{
			((ComDev) Com_Para.htComPort.get("A")).writeBuff("abc123".toString().getBytes(Com_Para.U_CODE));
			if(!java.util.Objects.equals(((ComDev) Com_Para.htComPort.get("A")).getReturnValue(),null))
				System.out.println("accept com data success:"
						+ new String(((ComDev) Com_Para.htComPort.get("A")).getReturnValue(),Com_Para.U_CODE));
			else
				System.out.println("accept com data success:null");
		}
		catch(Exception e)
		{
			Com_Fun.debug_in(e,this.toString());
		}
	}
}
